<h1>Listing topics</h1>

<table>
  <thead>
    <tr>
      <th>Title</th>
      <th>Description</th>
      <th colspan="3"></th>
    </tr>
  </thead>

  <tbody>
    <% @topics.each do |topic| %>
      <tr>
        <td><%= topic.title %></td>
        <td><%= topic.description %></td>
        <td><%= link_to 'Show', topic %></td>
        <td><%= link_to 'Edit', edit_topic_path(topic) %></td>
        <td><%= link_to 'Destroy', topic, method: :delete, data: { confirm: 'Are you sure?' } %></td>
      </tr>
    <% end %>
  </tbody>
</table>

<br>

<%= link_to 'New Topic', new_topic_path %>
